function checkCat(){
    var cat=document.getElementById("categoryText").value
    var catErr=document.getElementById("catErr");
    catErr.innerHTML="";
    var ret=true;
    if(cat==''){
	catErr.innerHTML="Insert at least 1 character";
	ret=false;
    }
    return ret;
}

function checkSubCat(){
    var subCat=document.getElementById("subcategoryText").value
    var subCatErr=document.getElementById("subCatErr");
    subCatErr.innerHTML="";
    var ret=true;
    if(subCat==''){
	subCatErr.innerHTML="Insert at least 1 character";
	ret=false;
    }
    return ret;
}